// SPDX-License-Identifier: MIT

@use "../settings/config" as cfg;

$padding:    map-get(cfg.$separators, "medium") !default;
$line-color: -color-border-muted !default;
$line-width: cfg.$border-width   !default;

.separator {

  -color-separator: $line-color;

  &:horizontal {
    -fx-padding: $padding 0 $padding 0;

    // using border instead of insets to get thinner line
    >.line {
      -fx-border-color: -color-separator transparent transparent transparent;
      -fx-border-insets: $line-width 0 0 0;
    }
  }

  &:vertical {
    -fx-padding: 0 $padding 0 $padding;

    >.line {
      -fx-border-color: transparent transparent transparent -color-separator;
      -fx-border-insets: 0 0 0 $line-width;
    }
  }

  @each $size, $padding in cfg.$separators {
    &.#{$size}:horizontal {
      -fx-padding: $padding 0 $padding 0;
    }

    &.#{$size}:vertical {
      -fx-padding: 0 $padding 0 $padding;
    }
  }
}
